<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link href="../../element/index.css" rel="stylesheet" />
		<script src="../../js/vue.js"></script>
		<script src="../../element/index.js"></script>
		<script src="../../js/axios.js"></script>
		<style>
			*{margin: 0;padding: 0;}
			#app{
			
				/* border: 1px solid #00FFFF; */
				width:100%;
				margin: 0 auto;
				box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
				margin-top: 20px;
			}
			.el-header,.el-main{
				margin-left: 80px;
			}
			.el-row{
				margin-bottom: 10px;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<el-container>
				<el-header style="padding: 10px;">
					<h3>修改密码</h3>
				</el-header>
				<hr />
				<el-main>
					<el-row type="flex" j>
						<el-col :span=3><div>*旧密码</div></el-col>
						<el-col :span=12><el-input v-model="oldPass" @focus="cleraPass" @blur="addPass"></el-input></el-clo>
					</el-row>
					<el-row>
						<el-col :span=3><div>*新密码</div></el-col>
						<el-col :span=12><el-input v-model="newPass" @focus="cleraPass1" @blur="addPass1"></el-input></el-clo>
					</el-row>
					<el-row>
						<el-col :span=3><div>*确认新密码</div></el-col>
						<el-col :span=12><el-input v-model="isNewPass" @focus="cleraPass2" @blur="addPass2"></el-input></el-clo>
					</el-row>
					<el-row>
						<el-button type="primary"  @click="toIndex" >
							<el-link style="color: white;" href="javascript:void(0)">退出</el-link>
						</el-button>
					</el-row>
				</el-main>
			</el-container>
		</div>
	</body>
</html>
<script>
	new Vue({
		el:"#app",
		data:{
			oldPass:"请输入密码",
			newPass:"请输入密码",
			isNewPass:"请输入密码"
		},
		methods:{
			cleraPass:function(){
				if(this.oldPass==="请输入密码"){
					this.oldPass=""
				}
			},
			addPass:function(){
				if(this.oldPass===""){
					this.oldPass="请输入密码"
				}
			},
			cleraPass1:function(){
				if(this.newPass==="请输入密码"){
					this.newPass=""
				}
			},
			addPass1:function(){
				if(this.newPass===""){
					this.newPass="请输入密码"
				}
			},
			cleraPass2:function(){
				if(this.isNewPass==="请输入密码"){
					this.isNewPass=""
				}
			},
			addPass2:function(){
				if(this.isNewPass===""){
					this.isNewPass="请输入密码"
				}
			},
			save:function(){
			},
			toIndex(){
				// 实现相应方法之后回到主页
				window.parent.location='../../index.html'
			}
		}
	})
</script>
